/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package dbo;

/**
 *
 * @author bi
 */
public class Equipment {
    public Squad squad;
    public Weapon weapon;
    private int amount;

    public Equipment(Squad squad, Weapon weapon, int amount) {
        this.squad = squad;
        this.weapon = weapon;
        this.amount = amount;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj.getClass().equals(this.getClass())) {
            if (this.hashCode() == obj.hashCode()) {
                return true;
            }
        }
        return false;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 83 * hash + (this.squad != null ? this.squad.hashCode() : 0);
        hash = 83 * hash + (this.weapon != null ? this.weapon.hashCode() : 0);
        return hash;
    }

    /**
     * @return the amount
     */
    public int getAmount() {
        return amount;
    }

}
